import React from 'react'

import './MainMenu.less'

class MainMenu extends React.Component {

  constructor(props) {
    super(props)
    this.state = {

    }
  }

  onParaEvent = (tabId) => {
    this.props.onAddTab(tabId)
  }

  render() {
    return (
      <div className="cabin-menu">
        <ul className="menu-lv1">
          <li className="exp">
            <p className="para-lv">基础组件</p>
            <ul className="menu-lv2">
              <li className="exp">
                <p className="para-lv">通用</p>
                <ul className="menu-lv3">
                  <li><p className="para-lv" onClick={ () => { this.onParaEvent('inner-plugin') } }>InnerPlugin</p></li>
                  <li><p className="para-lv" onClick={ () => { this.onParaEvent('component-a') } }>ComponentA</p></li>
                  <li><p className="para-lv" onClick={ () => { this.onParaEvent('component-b') } }>ComponentB</p></li>
                </ul>
              </li>
            </ul>
          </li>
        </ul>
      </div>
    )
  }
}

export default MainMenu